# 3-15 用Python实现回文检测器
from pythonds.basic import Deque
def palchecker(aString):
    d=Deque()

    for item in aString:
        d.addRear(item)

    while d.size()>1:
        left=d.removeFront()
        right=d.removeRear()
        if left!=right:
            return False
    return True
flag=palchecker("Hello")
print("Yes" if flag else "NO")